package com.htgd.gardenexpo.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 优惠券
 * </p>
 *
 * @author author
 * @since 2024-06-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ge_con_coupon")
@ApiModel(value="GeConCoupon对象", description="优惠券")
public class GeConCouponVO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "优惠券名称")
    private String name;

    @ApiModelProperty(value = "优惠券类型（1抵扣券）")
    private Integer type;

    @ApiModelProperty(value = "类型名称")
    private String typeName;

    @ApiModelProperty(value = "面额")
    private BigDecimal amount;

    @ApiModelProperty(value = "使用条件类型（0无条件，1满减）")
    private Integer conditionType;

    @ApiModelProperty(value = "满xx可用")
    private BigDecimal reductionAmount;

    @ApiModelProperty(value = "最低消费")
    private BigDecimal minCost;

    @ApiModelProperty(value = "发行量")
    private Integer circulation;

    @ApiModelProperty(value = "限领")
    private Integer limitAmount;

    @ApiModelProperty(value = "有效期类型（1长期，2多少天后，3固定时间）")
    private Integer validityType;

    @ApiModelProperty(value = "固定天数")
    private Integer fixedDays;

    @ApiModelProperty(value = "固定日期")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private LocalDate fixedTime;

    @ApiModelProperty(value = "开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime startTime;

    @ApiModelProperty(value = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "类目id")
    private Integer categoryId;

    @ApiModelProperty(value = "类目名称")
    private String categoryName;

    @ApiModelProperty(value = "说明")
    private String description;

    @ApiModelProperty(value = "状态（1生效，2结束，0待激活）")
    private String status;

    @ApiModelProperty(value = "使用条件")
    @TableField(exist = false)
    private String conditionText;

    @ApiModelProperty(value = "使用时间")
    @TableField(exist = false)
    private String timeText;

}
